package com.firstclass.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.firstclass.entity.TakestudentEntity;
import com.firstclass.entity.vo.CollegeVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

/**
 *
 *
 * @author chenshun
 * @email sunlightcs@gmail.com
 * @date 2021-12-12 15:16:44
 */
@Mapper
@Repository
public interface TakestudentDao extends BaseMapper<TakestudentEntity> {

    @Select("select `college` as `name`, count(1) as `nums` from `takestudent` group by `college`")
    List<CollegeVo> collegeNums();

}
